using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class LIC_FeatureMap : EntityTypeConfiguration<LIC_Feature>
    {
        public LIC_FeatureMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(50);

            this.Property(t => t.Code)
                .HasMaxLength(50);

            this.Property(t => t.Serial)
                .HasMaxLength(50);

            this.Property(t => t.License)
                .HasMaxLength(50);

            this.Property(t => t.Workstation)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("LIC_Feature");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.Serial).HasColumnName("Serial");
            this.Property(t => t.License).HasColumnName("License");
            this.Property(t => t.Workstation).HasColumnName("Workstation");
            this.Property(t => t.Date).HasColumnName("Date");
        }
    }
}
